package in.careerscale.apps.ocms.dao.model;

// Generated Jul 7, 2013 10:49:55 AM by Hibernate Tools 4.0.0

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Fund generated by hbm2java
 */
@Entity
@Table(name = "fund", catalog = "ocms")
public class Fund implements java.io.Serializable {

	private Integer id;
	private FundStatus fundStatus;
	private CaseMaster caseMaster;
	private LoginMaster loginMaster;
	private String donor;
	private String purpose;
	private Integer creditAmount;
	private Date promisedDate;
	private Date confirmedDate;
	private Date receiptIssuedOn;
	private Integer debitedAmount;
	private String confirmationComments;
	private String receiptDescription;
	private LoginMaster confirmedBy;
	private byte[] receipt;

	public Fund() {
	}

	public Fund(CaseMaster caseMaster, LoginMaster loginMaster, String donor,
			String purpose, int creditAmount, Date promisedDate) {
		this.caseMaster = caseMaster;
		this.loginMaster = loginMaster;
		this.donor = donor;
		this.purpose = purpose;
		this.creditAmount = creditAmount;
		this.promisedDate = promisedDate;
	}

	public Fund(FundStatus fundStatus, CaseMaster caseMaster,
			LoginMaster loginMaster, String donor, String purpose, 
			Integer creditAmount, Date promisedDate, Date confirmedDate,
			Date receiptIssuedOn, Integer debitedAmount) {
		this.fundStatus = fundStatus;
		this.caseMaster = caseMaster;
		this.loginMaster = loginMaster;
		this.donor = donor;
		this.purpose = purpose;
		this.creditAmount = creditAmount;
		this.promisedDate = promisedDate;
		this.confirmedDate = confirmedDate;
		this.receiptIssuedOn = receiptIssuedOn;
		this.debitedAmount = debitedAmount;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "status_id")
	public FundStatus getFundStatus() {
		return this.fundStatus;
	}

	public void setFundStatus(FundStatus fundStatus) {
		this.fundStatus = fundStatus;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "case_id", nullable = false)
	public CaseMaster getCaseMaster() {
		return this.caseMaster;
	}

	public void setCaseMaster(CaseMaster caseMaster) {
		this.caseMaster = caseMaster;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "login_id", nullable = false)
	public LoginMaster getLoginMaster() {
		return this.loginMaster;
	}

	public void setLoginMaster(LoginMaster loginMaster) {
		this.loginMaster = loginMaster;
	}

	@Column(name = "donor", nullable = false, length = 150)
	public String getDonor() {
		return this.donor;
	}

	public void setDonor(String donor) {
		this.donor = donor;
	}

	@Column(name = "purpose", nullable = false)
	public String getPurpose() {
		return this.purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	
	@Column(name = "credit_amount")
	public Integer getCreditAmount() {
		return this.creditAmount;
	}

	public void setCreditAmount(Integer creditAmount) {
		this.creditAmount = creditAmount;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "promised_date", nullable = false, length = 19)
	public Date getPromisedDate() {
		return this.promisedDate;
	}

	public void setPromisedDate(Date promisedDate) {
		this.promisedDate = promisedDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "confirmed_date", length = 19)
	public Date getConfirmedDate() {
		return this.confirmedDate;
	}

	public void setConfirmedDate(Date confirmedDate) {
		this.confirmedDate = confirmedDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "receipt_issued_on", length = 19)
	public Date getReceiptIssuedOn() {
		return this.receiptIssuedOn;
	}

	public void setReceiptIssuedOn(Date receiptIssuedOn) {
		this.receiptIssuedOn = receiptIssuedOn;
	}

	@Column(name = "debited_amount")
	public Integer getDebitedAmount() {
		return this.debitedAmount;
	}

	public void setDebitedAmount(Integer debitedAmount) {
		this.debitedAmount = debitedAmount;
	}
	
	public void setConfirmedBy(LoginMaster confirmedBy)
	{
		this.confirmedBy = confirmedBy;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "confirmed_by", nullable = true)
	public LoginMaster getConfirmedBy()
	{
		return this.confirmedBy;
	}

	@Column(name = "confirmation_comments", nullable = true)
	public String getConfirmationComments()
	{
		return confirmationComments;
	}

	public void setConfirmationComments(String confirmationComments)
	{
		this.confirmationComments = confirmationComments;
	}

	@Column(name = "receipt_description", nullable = true)
	public String getReceiptDescription()
	{
		return receiptDescription;
	}

	public void setReceiptDescription(String receiptDescription)
	{
		this.receiptDescription = receiptDescription;
	}

	@Column(name = "receipt", nullable = false)
	public byte[] getReceipt()
	{
		return receipt;
	}

	public void setReceipt(byte[] receipt)
	{
		this.receipt = receipt;
	}

}
